﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Web;

namespace DotNETX.Web.Authority
{
    public struct AuthorityValidateResult
    {
        /// <summary>
        /// 数值越高，优先级越高
        /// </summary>
        public uint Level { get; set; }

        public bool Passable { get; set; }

        public string Message { get; set; }

        public static AuthorityValidateResult Deny(uint level)
        {
            return new AuthorityValidateResult() { Passable = false, Level = level };
        }
        public static AuthorityValidateResult Pass(uint level)
        {
            return new AuthorityValidateResult() { Passable = true, Level = level };
        }
    }
}
